<include file="Public/header"/>
<link href="/Public/Front/css/fileinput.min.css" rel="stylesheet">
<link href="/Public/Front/css/theme.css" rel="stylesheet">
<div class="row">
    <div class="col-md-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>申请认证</h5>
            </div>
            <div class="ibox-content">
                <if condition="$authorized eq 1">
                    <p class="bg-success" style="padding:10px 0px 10px 30px">您已成功认证！</p>
                <elseif condition="$authorized eq 2"/>
                    <p class="bg-info" style="padding:10px 0px 10px 30px">已提交认证，等待审核！</p>
                <else/>
                    <blockquote class="layui-elem-quote">
                        <p class="text-danger">请上传：身份证正反面、正面手持身份证、营业执照、银行卡正反面图片。</p>
                    </blockquote>
                    <input id="input-ke-1" name="auth[]" type="file" multiple class="file-loading" accept="image">
                </if>
            </div>
        </div>
    </div>
</div>
<include file="Public/footer"/>
<script src="/Public/Front/js/fileinput.min.js"></script>
<script src="/Public/Front/js/fileinput_locale_zh.js"></script>
<script src="/Public/Front/js/theme.js"></script>
<script>
    layui.use([ 'layer','element'], function() {
        var layer = layui.layer //弹层
            ,element = layui.element; //元素操作
    });
    $("#input-ke-1").fileinput({
        language: 'zh',
        theme: "explorer",
        uploadUrl: "<{:U('Account/upload')}>",
        allowedFileExtensions: ['jpg', 'png', 'gif'],
        overwriteInitial: false,
        initialPreviewAsData: true,
        maxFileCount: 6,
    }).on('filebatchuploadcomplete', function(event, data) {
        layer.confirm('现在去申请认证吗？', function (index) {
            window.location.href='<{:U("Account/certification")}>';
        });
    });
</script>
</body>
</html>